<html>
<head><meta charset="utf-8"><title>probable nll bug · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/probable.20nll.20bug.html">probable nll bug</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="130224218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/probable%20nll%20bug/near/130224218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/probable.20nll.20bug.html#130224218">(Jul 24 2018 at 17:30)</a>:</h4>
<p>Came across this conversation on #rust irc:</p>



<a name="130224288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/probable%20nll%20bug/near/130224288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/probable.20nll.20bug.html#130224288">(Jul 24 2018 at 17:30)</a>:</h4>
<p>code: <a href="https://play.rust-lang.org/?gist=6c72f5d87e82cf0e3509dbae79f23037&amp;version=nightly&amp;mode=debug&amp;edition=2015" target="_blank" title="https://play.rust-lang.org/?gist=6c72f5d87e82cf0e3509dbae79f23037&amp;version=nightly&amp;mode=debug&amp;edition=2015">https://play.rust-lang.org/?gist=6c72f5d87e82cf0e3509dbae79f23037&amp;version=nightly&amp;mode=debug&amp;edition=2015</a></p>
<p>run the code, comment out line 15 and run the code again</p>



<a name="130224298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/probable%20nll%20bug/near/130224298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/probable.20nll.20bug.html#130224298">(Jul 24 2018 at 17:30)</a>:</h4>
<p>now remove <code>#![feature(nll)]</code> and repeat the same steps</p>



<a name="130224410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/probable%20nll%20bug/near/130224410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/probable.20nll.20bug.html#130224410">(Jul 24 2018 at 17:32)</a>:</h4>
<p>from irc:</p>
<blockquote>
<p>Looks like a worse error message than before due to NLL. Without NLL, it's a use-after-move error. With NLL, it may point to uninitialized instead of moved<br>
Just to clarify, it appears to be the combination of NLL and assigning to the struct field that causes the mention of using/borrowing something that has been moved to disappear from the error message.</p>
</blockquote>



<a name="130224604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/probable%20nll%20bug/near/130224604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/probable.20nll.20bug.html#130224604">(Jul 24 2018 at 17:35)</a>:</h4>
<p><span class="user-mention" data-user-id="120823">@DPC</span> that link doesn't have any code in it, you'd need to click "Share" from the playground while you have the code in it. We just see whatever we had typed into playground last.</p>



<a name="130224614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/probable%20nll%20bug/near/130224614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/probable.20nll.20bug.html#130224614">(Jul 24 2018 at 17:35)</a>:</h4>
<p>my bad xD</p>



<a name="130224628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/probable%20nll%20bug/near/130224628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/probable.20nll.20bug.html#130224628">(Jul 24 2018 at 17:35)</a>:</h4>
<p>Code: <a href="https://play.rust-lang.org/?gist=6c72f5d87e82cf0e3509dbae79f23037&amp;version=nightly&amp;mode=debug&amp;edition=2015" target="_blank" title="https://play.rust-lang.org/?gist=6c72f5d87e82cf0e3509dbae79f23037&amp;version=nightly&amp;mode=debug&amp;edition=2015">https://play.rust-lang.org/?gist=6c72f5d87e82cf0e3509dbae79f23037&amp;version=nightly&amp;mode=debug&amp;edition=2015</a></p>



<a name="130224702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/probable%20nll%20bug/near/130224702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/probable.20nll.20bug.html#130224702">(Jul 24 2018 at 17:36)</a>:</h4>
<p>i thought i had already clicked on share <span class="emoji emoji-1f601" title="grin">:grin:</span></p>



<a name="130225895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/probable%20nll%20bug/near/130225895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/probable.20nll.20bug.html#130225895">(Jul 24 2018 at 17:55)</a>:</h4>
<p>issue opened: <a href="https://github.com/rust-lang/rust/issues/52669" target="_blank" title="https://github.com/rust-lang/rust/issues/52669">https://github.com/rust-lang/rust/issues/52669</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>